<!doctype html>
<html lang="zh-cmn" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <base th:href="@{/}"/>
    <title>Document</title>
    <link rel="stylesheet" href="../../static/css/bootstrap.css" th:href="@{/css/bootstrap.css}"/>
    <header th:replace="comm :: header"></header>
</head>
<body>
<div id="toolbar">
    <button onclick="add()" class="btn btn-primary" type="button">添加角色</button>
    <button onclick="batchDel()" class="btn btn-danger" type="button">批量删除</button>
    <button onclick="grant()" class="btn btn-success" type="button">角色授权</button>
</div>



<div class="container" style="margin-top: 50px">
    <table id="roleTb"
           data-toggle="table"
           data-url="/sys/js/list"
           data-striped="true"
           data-toolbar="#toolbar"
    >
        <thead>
        <tr>
            <th data-checkbox="true"></th>
            <th data-field="id">编号</th>
            <th data-field="name">名称</th>
            <th data-field="state" data-formatter="fmtState">状态</th>
            <th data-field="modifyTime" data-formatter="fmtTime">修改时间</th>
            <th data-formatter="optFmt" data-events="optEvent">操作</th>
        </tr>
        </thead>
    </table>

</div>


<div id="add">
    <form class="form-horizontal">
        <div class="form-group">
            <label class="control-label col-md-3">角色名称：</label>
            <div class="col-md-8">
                <input type="text" name="name" class="form-control"/>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-3">角色状态：</label>
            <div class="col-md-8">
                <label class="radio-inline">
                    <input type="radio"  name="state" value="1" checked/>启用
                </label>
                <label class="radio-inline">
                    <input type="radio"  name="state" value="0"/>禁用
                </label>
            </div>
        </div>
    </form>
</div>

<div id="grant">
    <div id="tree"></div>
</div>


<div id="updateName">
    <form class="form-horizontal">
        <input type="hidden" name="id">
        <div class="form-group">
            <label class="control-label col-md-3">角色名称：</label>
            <div class="col-md-8">
                <input type="text" name="name" class="form-control"/>
            </div>
        </div>
    </form>
</div>
<footer th:replace="comm :: footer"></footer>
<script th:src="@{/myJs/role.js}"></script>
</body>
</html>